"use strict";
var app = angular.module("myApp",["ngRoute"]);
app.controller("indexControlelr",function($scope,$location){
    $scope.$on("$viewContentLoaded",function(){
        console.log("ng-view content loaded!");
    });
    $scope.$on("$routeChangeStart",function(event,next,current){
        //event.preventDefault(); //cancel url change
        console.log("route change start!");
    });
});
app.config(function($routeProvider, $locationProvider) {
    $routeProvider
    .when('/course', {
        templateUrl: 'admin-course.html',
        controller: 'courseController'
    })
    .when('/picture', {
        templateUrl: 'admin-picture.html',
        controller: 'imagesController'
    })
    .otherwise({
        redirectTo: '/course'
    });
});
